<!DOCTYPE html>
<style>
  body {
    container: size;
    width: 200px;
  }

  div {
    width: 0px;
    height: 0px;
  }

  @container size(min-width: 100px) {
    .rule1 {
      width: 10px;
    }
  }
</style>
<script>
  const sheet = new CSSStyleSheet();
  sheet.insertRule('@container size(min-width: 50px) { .rule2 { height: 10px; } }', 0);
  document.adoptedStyleSheets = [sheet];
</script>
<div class="rule1 rule2"></div>
